<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ include file="/page/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>${AppBaseInfo.appName}</title>
<%@ include file="/adapter/adapter-bootstrap.jsp" %>
<script type="text/javascript"><!--
     function doGenerateBaseProject(){	
		var appProjectState = '${AppBaseInfo.appProjectState}';
			if (appProjectState > '0') {
				alert('已经生成过基础工程!');
				return;
			}
			$.ajax( {
				type : 'post',
				url : '${ctx}/appmgr/generateBaseProject',
				dataType : "json",
				data : $("#baseinfo").serialize(),
				async : false,
				success : function(data) {//返回json结果
					var result = data.model.ec;
					if (result != 0) {
						alert(data.model.em);
					} else {
						alert("生成基础工程成功!");
						try {
							opener.document.location.reload(true);
						} catch (e) {
	
						}
						window.close();
					}
				}
			});	
		}
</script>
</head>
<body>
<div class="panel panel-default ">
   <div class="panel-heading">
      <h3 class="panel-title" >
${AppBaseInfo.appName}-生成基础工程设置
      </h3>
   </div>
   <div class="panel-body">
<form class="form-horizontal" role="form" id="baseinfo" name="baseinfo"  action="#" method="post">
                    <fieldset>
                       <div class="form-group">
                          <label class="col-xs-2 control-label" for="ds_username">SVN服务器</label>
                          <div class="col-xs-10">
                             <input class="form-control" name="svnUrl" type="text" readonly value="${svnUrl}"/>
                          </div>
                       </div>                    
                       <div class="form-group">
                          <label class="col-xs-2 control-label" for="ds_host">移动应用标识</label>
                          <div class="col-xs-4">
                             <input class="form-control" id="appId" name="appId" type="text"  value="${AppBaseInfo.appId}" readonly/> 
                          </div>
                          <label class="col-xs-2 control-label" for="ds_name">移动应用名称</label>
                          <div class="col-xs-4">
                             <input class="form-control" id="appName" name="appName" type="text" value="${AppBaseInfo.appName}" readonly/>
                          </div>
                       </div>
                       <div class="form-group">
                          <label class="col-xs-2 control-label" for="ds_password" >应用工程状态</label>
                          <div class="col-xs-4">
                             <input class="form-control"  type="text" id="remarks" name="remarks" value="${appProjectState}" readonly>
                          </div>
                          <label class="col-xs-2 control-label" for="ds_password">应用工程日期</label>
                          <div class="col-xs-4">
                             <input class="form-control"  type="text" id="remarks" name="remarks" value="${AppBaseInfo.appProjectDate}" readonly>
                          </div>                          
                       </div>                       
                       <div class="form-group">
                          <label class="col-xs-2 control-label" for="ds_username">应用工程地址</label>
                          <div class="col-xs-10">
 							  <input class="form-control" id="appVersionId" name="appVersionId" type="text" value="${AppBaseInfo.appProjectUrl}" readonly/>
                          </div>
                       </div>
                       <div class="form-group">   
                          <label class="col-xs-2 control-label" for="ds_password" >备注</label>
                          <div class="col-xs-10">
                             <textarea  class="form-control" id="remarks" name="remarks" rows="3" readonly>${AppBaseInfo.remarks}
                             </textarea>
                          </div>
                       </div>
                    </fieldset>     
                </form>
	</div>
	</div>
                    <br></br>

					<div class="form-group">
						<div class="col-xs-4"></div>
						<div class="col-xs-8">
							<button type="button" class="btn btn-default" onclick="doGenerateBaseProject()">生成基础工程</button>
							<button type="button" class="btn btn-default"  onclick="window.close()">&nbsp;&nbsp;&nbsp;&nbsp;关&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;闭&nbsp;&nbsp;&nbsp;&nbsp;</button>
						</div>
					</div>
                    <br></br>	
</body>
</html>
